class stripfan_mesh
{
public:
int nstripfan;
int *stripfandata;
int nvert;
vertex *vertdata;
stripfan_mesh()
{ nstripfan=0; stripfandata=0; vertdata=0; nvert=0; }
void draw();
mesh *build_mesh();
vertex *add_stripfan(int nvert,int texpic,int lmpic);
void reset()
{
if (stripfandata) delete stripfandata;
if (vertdata) delete vertdata;
nstripfan=0; stripfandata=0; vertdata=0; nvert=0;
}
virtual ~stripfan_mesh()
{ reset(); }
};
Member | Type | Description |
---|---|---|
nstripfan | int | number of strips and fans |
stripfandata | int * | data for the strips and fans. 3 integers for each strip/fan. |
nvert | int | number of vertices in vertdata array |
vertdata | vertex * | vertices array |
draw, build_mesh, add_stripfan, reset
This class implements a mesh made of strips and fans. Each strip/fan is made
of an array of vertex classes.
The stripfandata is an array of integers with nstripfan*3 elements. Each 3
elements defines a strip/fan as follwos:
1) The first element is the number of vertices for the strip/fan. If positive,
it means a strip with n vertices. If negative, a fan with -n vertices.
2) The second element is the texture applied to strip/fan. If -1, no texture.
3) The third element is the light map applied to strip/fan. If -1, no light
map.